From 4cad38d5ed515f4e5707173502739c320770a4a5 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Wed, 9 Jun 1993 09:44:24 +0000 Subject: [PATCH] * scroll-bar.el (scroll-bar-set-window-start): Remember that the scroll bar numbers reflect the accessible region of the buffer, not the entire buffer. --- lisp/scroll-bar.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/scroll-bar.el b/lisp/scroll-bar.el index fa7e4a6d3ec..3e30e1b5e7d 100644 --- a/lisp/scroll-bar.el +++ b/lisp/scroll-bar.el @@ -92,7 +92,9 @@ EVENT should be a scroll bar click or drag event." (save-excursion (set-buffer (window-buffer window)) (save-excursion - (goto-char (scroll-bar-scale portion-whole (buffer-size))) + (goto-char (+ (point-min) + (scroll-bar-scale portion-whole + (- (point-max) (point-min))))) (beginning-of-line) (set-window-start window (point)))))) -- 2.30.2